home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / archiver / unix / zip19p1.zoo / vms / vms_zip.rnh < prev    next >
Text File  |  1992-08-20  |  18KB  |  416 lines

  1. .!
  2. .!  File:    ZIP.RNH
  3. .!
  4. .!  Author:    Hunter Goatley
  5. .!
  6. .!  Date:    October 22, 1991
  7. .!
  8. .!  Description:
  9. .!
  10. .!    RUNOFF source file for portable ZIP on-line help for VMS.
  11. .!    Adapted from ZIP.DOC, distributed with ZIP.
  12. .!
  13. .!    To build:    $ RUNOFF ZIP.RNH
  14. .!            $ LIBR/HELP/INSERT libr ZIP
  15. .!
  16. .!  Modification history:
  17. .!
  18. .!    Hunter Goatley        22-OCT-1991 20:45
  19. .!        Genesis.
  20. .!    Jean-loup Gailly    25 March 92
  21. .!        Adaptation to zip 1.6.
  22. .!    Igor Mandrichenko    9-JUN-1992
  23. .!        Added explanation of -V option.
  24. .!    Jean-loup Gailly    14 June 92
  25. .!        Adaptation to zip 1.8.
  26. .!    Jean-loup Gailly    20 Aug 92
  27. .!        Adaptation to zip 1.9.
  28. .!
  29. .noflags
  30. .lm4 .rm72
  31. .indent -4
  32. 1 ZIP
  33. .br
  34. Zip is a compression and file packaging utility for Unix, MSDOS, OS/2, and
  35. VMS.  It is analogous to a combination of tar and compress and is
  36. compatible with PKZIP (Phil Katz ZIP) for MSDOS systems.
  37. .sk
  38. There is a companion to Zip called UnZip (of course).  Zip and UnZip can
  39. work with files produced by PKZIP under MSDOS, and PKZIP and PKUNZIP can
  40. work with files produced by Zip.
  41. .sk
  42. Zip 1.9 is compatible with PKZIP 1.93a.
  43. Note that pkunzip 1.10 cannot extract files produced by pkzip 1.93a
  44. or zip 1.9. You must use pkzip 1.93a or unzip 5.0 to extract them.
  45. .sk
  46. For a brief help on Zip and Unzip, run each without specifying any
  47. parameters on the command line.
  48. .sk
  49. Zip puts one or more compressed files into a single "zip file" along with
  50. information about the files, including the name, path if requested, date
  51. and time last modified, protection, and check information to verify the
  52. fidelity of each entry.  Zip can pack an entire directory structure in a
  53. zip file with a single command.  Compression ratios of 2:1 to 3:1 are
  54. common for text files.  Zip has has one compression method (deflation) and
  55. can also store files without compression. It automatically chooses the better
  56. of the two for each file to be compressed.
  57. .sk
  58. Zip is useful for packaging a set of files to send to someone or for
  59. distribution; for archiving or backing up files; and for saving disk space
  60. by temporarily compressing unused files or directories.
  61. .sk
  62. Format:
  63. .sk;.lm+1;.literal
  64. ZIP [-options] [-b path] [-n suffixes] [-t mmddyy] zipfile file(s) [-x list]
  65. .end literal;.lm-1
  66. .!------------------------------------------------------------------------------
  67. .indent -4
  68. 2 Options
  69. .br
  70. The default action of Zip is to add or replace zipfile entries from list, which
  71. can include the special name -@ to read names from SYS$INPUT.  The following
  72. list of options was taken from the on-line help generated when Zip is run
  73. without any command-line parameters:
  74. .sk
  75. .literal
  76.   -f   freshen: only changed files
  77.   -d   delete entries in zipfile
  78.   -k   simulate PKZIP made zipfile
  79.   -h   show this help
  80.   -r   recurse into directories
  81.   -q   quiet operation
  82.   -c   add one-line comments
  83.   -b   use "path" for temp files
  84.   -o   make zipfile as old as latest entry
  85.   -w   append the VMS version number to name stored in zip file
  86.   -x   exclude the names that follow from those operated on
  87.   -u   update: only changed or new files
  88.   -m   move into zipfile (delete files)
  89.   -g   allow growing existing zipfile
  90.   -l   translate end-of-lines
  91.   -j   junk (don't record) directory names
  92.   -0   store only
  93.   -1   compress faster
  94.   -9   compress better
  95.   -n   don't compress theses suffixes
  96.   -z   add zipfile comment
  97.   -t   only do files after "mmddyy"
  98.   -L   show software license
  99.   -V   save VMS file attributes
  100. .end literal
  101. .!------------------------------------------------------------------------------
  102. .indent -4
  103. 2 How_To_Use_Zip
  104. .br
  105. The simplest use of Zip is as follows:
  106. .sk;.indent 10;$ zip stuff *
  107. .sk
  108. This will create the file "STUFF.ZIP" (assuming it does not exist) and put
  109. all the files in the current directory in STUFF.ZIP in a compressed form.
  110. The .ZIP suffix is added automatically, unless that file name given
  111. contains a dot already.  This allows specifying suffixes other than ".ZIP".
  112. .sk
  113. To zip up an entire directory, the command:
  114. .sk;.indent 10
  115. $ zip -r foo *.*
  116. .sk
  117. will create the file "FOO.ZIP" containing all the files and directories in
  118. the in the current directory.  The "r" option means recurse through the
  119. directory structure.
  120. .sk
  121. You may want to make a zip file that contains the files in [.FOO], but not
  122. record the directory name, FOO.  You can use the -j (junk path) option to
  123. leave off the path:
  124. .sk;.indent 10
  125. $ zip -j foo [.foo]*.*
  126. .sk
  127. You might be zipping to save disk space, in which case you could:
  128. .sk;.indent 10
  129. $ zip -rm foo *.txt
  130. .sk
  131. where the "m" option means "move".  This will delete all files matching
  132. *.txt after making FOO.ZIP.  No deletions will be done until the zip has
  133. completed with no errors.  This option is obviously more dangerous and
  134. should be used with care.
  135. .sk
  136. If the zip file already exists, these commands will replace existing or add
  137. new entries to the zip file.  For example, if you were really short on disk
  138. space, you might not have enough room simultaneously to hold the directory
  139. [.FOO] and the compressed FOO.ZIP.  In this case, you could do it in steps.
  140. If [.FOO] contained the subdirectories [.TOM], [.DICK], and [.HARRY], then
  141. you could:
  142. .sk;
  143. .indent 10;$ zip -rm foo [.foo.tom]
  144. .indent 10;$ zip -rm foo [.foo.dick]
  145. .indent 10;$ zip -rm foo [.foo.harry]
  146. .sk
  147. where the first command would create FOO.ZIP, and the next two would add to
  148. it.  At the completion of each zip command, the files in the directory just
  149. zipped would be deleted, making room in which the next Zip command could
  150. work.
  151. .!------------------------------------------------------------------------------
  152. .indent -4
  153. 2 Modifying_Existing_Zip_Files
  154. .br
  155. When given the name of an existing zip file with the above commands, Zip
  156. will replace identically named entries in the Zip file or add entries for
  157. new names.  For example, if FOO.ZIP exists and contains foo/file1 and
  158. foo/file2, and the directory [.FOO] contains the files foo/file1 and
  159. foo/file3, then:
  160. .sk;.indent 10
  161. $ zip -r foo foo
  162. .sk
  163. will replace foo/file1 in foo.zip and add foo/file3 to FOO.ZIP.  After
  164. this, FOO.ZIP contains foo/file1, foo/file2, and foo/file3, with foo/file2
  165. unchanged from before.
  166. .sk
  167. When changing an existing zip file, Zip will write a temporary file with
  168. the new contents, and only replace the old one when the zip has completed
  169. with no errors. You can use
  170. the -b option to specify a different path (usually a different dev- ice) to
  171. put the temporary files in.  For example:
  172. .sk;.indent 10
  173. $ zip -b scratch$:[tmp] stuff *
  174. .sk
  175. will put the temporary zip file and the temporary compression files in the
  176. directory "SCRATCH$:[TMP]", copying over STUFF.ZIP in the current directory
  177. when done.
  178. .sk
  179. If you are only adding entries to a zip file, not replacing, and the -g
  180. option is given, then Zip grows (appends to) the file instead of copying
  181. it.  The danger of this is that if the operation fails, the original zip
  182. file is corrupted and lost.
  183. .sk
  184. There are two other ways to change or add entries in a zip file that are
  185. restrictions of simple addition or replacement.  The first is -u (update)
  186. which will add new entries to the zip file as before but will replace
  187. existing entries only if the modified date of the file is more recent than
  188. the date recorded for that name in the zip file.  For example:
  189. .sk;.indent 10
  190. $ zip -u stuff *
  191. .sk
  192. will add any new files in the current directory, and update any changed
  193. files in the zip file STUFF.ZIP.  Note that Zip will not try to pack
  194. STUFF.ZIP into itself when you do this. Zip will always exclude the zip
  195. file from the files on which to be operated.
  196. .sk
  197. The second restriction is -f (freshen) which, like update, will only
  198. replace entries with newer files; unlike update, will not add files that
  199. are not already in the zip file. For this option, you may want to simply
  200. freshen all of the files that are in the specified zip file.  To do this
  201. you would simply:
  202. .sk;.indent 10
  203. $ zip -f foo
  204. .sk
  205. Note that the -f option with no arguments freshens all the entries in the
  206. zip file.  The same is true of -u, and hence "zip -u foo" and "zip -f foo"
  207. both do the same thing.
  208. .sk
  209. This command should be run from the same directory from which the original
  210. zip command was run, since paths stored in zip files are always relative.
  211. .sk
  212. Another